package org.kgduyjj.toolkit.cases;

import java.util.Map;

import org.kgduyjj.toolkit.builder.MapBuilder;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;

public interface BaiduTransService {
    /**
     * fanyi
     * 
     * @param word
     * @return
     */
    default Call<ResponseBody> trans(String word) {
        return trans(MapBuilder.create().put("transtype", "translang").put("domain", "common").put("from", "en")
                .put("to", "zh").put("query", word).build());
    }

    @GET("/v2transapi?from=en&to=zh")
    Call<ResponseBody> trans(Map<Object, Object> params);
}
